import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;

public class Recorder {
    private static int allKilledEnemyTankNum =0;
    private static FileWriter fw = null;
    private static BufferedWriter bw = null;
    private static String recordFile = "e:/myRecord.txt";
    public static void keepRecord(){
        try {
            BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(recordFile));
            bw.write(allKilledEnemyTankNum +"\r\n");
        } catch (IOException e) {
            throw new RuntimeException(e);
        }finally {
            if(bw!=null) {
                try {
                    bw.close();
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
        }
    }

    public static int getAllKilledEnemyTankNum() {
        return allKilledEnemyTankNum;
    }
    public static void addAllKilledEnemyTankNum(){
        allKilledEnemyTankNum++;
    }
}
